package com.lrkj.back.service.impl;

import java.util.List;
import java.util.Map;

import com.lrkj.back.mapper.TbFileMapper;
import com.lrkj.back.entity.TbFile;
import com.lrkj.back.service.TbFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.com.cbons.mamisay.parent.db.api.DBInterface;
import cn.com.cbons.mamisay.parent.exception.DBException;
import cn.com.cbons.mamisay.parent.service.base.ParentServiceImpl;

@Transactional
@Service("file")
public class TbFileServiceImpl extends ParentServiceImpl<TbFile> implements TbFileService {

    @Autowired
    private TbFileMapper fileMapper;

    @Override
    public List<TbFile> findAll(Map<String, Object> map) throws DBException {
        return fileMapper.findAll(map);
    }

    @Override
    protected DBInterface<TbFile> getDao() throws DBException {
        return fileMapper;
    }

    @Override
    public int deleteByBatch(List<String> fileIds) {
        return fileMapper.deleteByBatch(fileIds);
    }

}
